<template>
    <div class="menu1-box">
        <div class="menu-swiper">
            <swiper :options="swiperOption">
                <swiper-slide>
                    <a href="https://zh.wikipedia.org/wiki/%E5%85%8B%E8%98%87%E9%AD%AF%E7%A5%9E%E8%A9%B1">
                        <p class="swiper-img"><img src="https://upload.wikimedia.org/wikipedia/commons/e/e8/HP_Lovecraft_%28par_Dominique_Signoret%29.jpg" />
                        <p class="swiper-title">洛夫克拉夫特神话</p>
                    </a>
                </swiper-slide>
                <swiper-slide>
                    <a href="https://zh.wikipedia.org/wiki/%E9%98%BF%E6%92%92%E6%89%98%E6%96%AF">
                        <p class="swiper-img"><img src="https://upload.wikimedia.org/wikipedia/commons/2/28/Azathoth.jpg" />
                        <p class="swiper-title">阿撒托斯</p>
                    </a>
                </swiper-slide>
            </swiper>
        </div>
        <Content :id="$route.params.id"></Content>
    </div>
</template>

<script>
  import 'swiper/dist/css/swiper.css'
  import { swiper, swiperSlide } from 'vue-awesome-swiper'
  import Content from './components/content.vue'

  export default {
    name: 'innerPage',
    data () {
      return {
        swiperOption: {
          loop: true,
          autoplay:true
        }
      }
    },
    components: {
      swiper,
      swiperSlide,
      Content
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
a {
  text-decoration: none;
}
.menu1-box {
  margin-top: 44px;
}

.menu-swiper {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background-color: #001c2d;
}

.swiper-img {
  width: 100%;
  height: 150px;
  overflow: hidden;
}

.swiper-img img {
  height: 100%;
  margin-left: 50%;
  transform: translateX(-50%);
}
.swiper-title {
  text-align: left;
  line-height: 30px;
  color: #fff;
  padding-left: 10px;
  font-size: 12px;
}
.swiper-pagination {
  position: fixed;
  bottom: 0;
  right: 0;
  background: #fff;
}
</style>
